#include "tv.h"
#include <iostream>
bool Tv::volup()
{
  if (volume < MaxVal)
  {
      volume ++;
      return true;
  }
      return false;
}

bool Tv::voldown()
{
    if (volume > MinVal)
    {
        volume --;
        return true;
    }
    return false;
}

bool Tv::channelup()
{
    if (channel < maxchannel)
    {
        channel ++;
        return true;
    }
    return false;
}

bool Tv::channeldown()
{
    if (channel > 0)
    {
        channel --;
        return true;
    }
    return false;
}

void Tv::settings() const {
    using std::cout;
    using std::endl;
    cout << "state:" << (state == On ? "On" : "Off") << endl;
    cout << "channel:" << channel << endl;
    cout << "mode:" << (mode == Cable ? "Cable" : "Broadcast") << endl;
    cout << "input:" << (input == TV ? "TV" : "DVD") << endl;
    cout << "volume:" << volume << endl;
}
